|
RAIS
3.2
|
00001 00028 using System; 00029 using System.Collections.Generic; 00030 using System.Text; 00031 using System.Data; 00032 00033 namespace RAIS.Common.UserManagement 00034 { 00038 public class Facility : DBObject 00039 { 00040 #region Constructors 00041 public Facility() 00042 { } 00043 public Facility(IDataRecord record) 00044 { 00045 this.ID = (int)record["PK Facility ID"]; 00046 this.Name = record["Facility Name"].ToString(); 00047 } 00048 #endregion 00049 #region Public methods 00050 public bool RestricitonsConflict(Facility facilitiy) 00051 { 00052 if (facilitiy.Name == RAIS.Common.Constants.ALL_FACILITIES && 00053 this.Name != RAIS.Common.Constants.ALL_FACILITIES) 00054 return true; 00055 else 00056 if (this.Name == RAIS.Common.Constants.ALL_FACILITIES && 00057 facilitiy.Name != RAIS.Common.Constants.ALL_FACILITIES) 00058 return true; 00059 else 00060 return false; 00061 } 00062 #endregion 00063 00064 00065 public override bool Equals(object obj) 00066 { 00067 if (this.id == ((Facility)obj).id) 00068 return true; 00069 return false; 00070 } 00071 } 00072 }